﻿using System;

namespace IceDog.Lib.Event.BoildWater.BoildWater.Warning
{
    class Alarm
    {
        public void MakeAlert(Object sender,BoiledEventArgs e)
        {
            Heater heater = (Heater)sender; //这里是不是很熟悉呢？
            //访问 sender 中的公共字段
            //Console.WriteLine("(热水器：产地 - {0} | 类型 - {1}): ", heater.Area, heater.Type);
            Console.WriteLine(e.Temperature == 100 ? "Alarm:呜呜呜~" : "Alarm:无声音");
        }
    }
}
